/*
 * Copyright (c) 2020-2030 Sishun.Co.Ltd. All Rights Reserved.
 */
package com.rabbitmq.demo.workmodle;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author ：lvfeilong
 * @version ：
 * @description ：工作队列模型
 * @program ：MySpringBoot
 * @date ：Created in 2021/4/8 9:17
 */
@Slf4j
@Component
public class WorkQueueModle {

    @RabbitListener(queuesToDeclare = {@Queue("work")})
    public void customer1(String message) {
        log.error("工作队列消费者1：{}",message);
    }

    @RabbitListener(queuesToDeclare = {@Queue("work")})
    public void customer2(String message) {
        log.error("工作队列消费者2：{}",message);
    }
}